package com.bwie.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.bwie.poi.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 订单表
 * @TableName tb_order
 */
@TableName(value ="tb_order")
@Data
public class Order implements Serializable {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    @Excel(name = "ID",sort = 1)
    private Integer orderId;

    /**
     * 订单编号
     */
    @Excel(name = "订单编号",sort = 2)
    private Long orderNo;

    /**
     * 订单状态;0未支付1已支付2待发货
     */
    @Excel(name = "订单类型",sort = 3,readConverterExp = "0=未支付,1=已支付,2=待支付")
    private Integer orderStatus;

    /**
     * 订单金额
     */
    @Excel(name = "订单金额",sort = 4)
    private BigDecimal orderAmount;

    /**
     * 支付时间
     */
    @Excel(name = "支付时间",sort = 5,dateFormat ="yyyy-MM-dd HH:mm:ss" )
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date payTime;

    /**
     * 订单类型
     */
    @Excel(name = "订单类型",sort = 6,readConverterExp = "1=普通订单,2=秒杀订单")
    private Integer orderType;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID",sort = 7)
    private Integer userId;

    /**
     * 商品信息
     */
    @Excel(name = "商品信息",sort = 8)
    private String prodInfo;

    /**
     * 创建人
     */
    @Excel(name = "创建人",sort = 9)
    private String createBy;

    /**
     * 创建时间
     */
    @Excel(name = "订单时间",sort = 10,dateFormat ="yyyy-MM-dd HH:mm:ss" )
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新人
     */
    @Excel(name = "更新人",sort = 11)
    private String updateBy;

    /**
     * 参团ID
     */
    private Integer groupId;

    /**
     * 更新时间
     */
    @Excel(name = "更新时间",sort = 12,dateFormat ="yyyy-MM-dd HH:mm:ss" )
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    @TableField(exist = false)
    private String typeName;
    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private List<String> imageList;

    @TableField(exist = false)
    private List<OrderDetail> orderDetailList;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}